package com.centaline.androidsalesblog.adapter.viewholder;

import android.support.v7.widget.AppCompatTextView;
import android.widget.ImageView;

import com.bumptech.glide.DrawableRequestBuilder;
import com.centanet.framework.glide.GlideLoad;

/**
 * 首页菜单
 */
public abstract class AbsHomeMenuVH {


    /**
     * 设置文本
     */
    protected void setText(AppCompatTextView appCompatTextView, String text) {
        appCompatTextView.setText(text);
    }

    /**
     * 加载图片
     */
    protected void loadImg(DrawableRequestBuilder<String> requestBuilder, ImageView imageView, String url) {
        GlideLoad.load(new GlideLoad.Builder(requestBuilder, url)
                .openWifiSwitch()
                .into(imageView));
    }

    /**
     * 点击事件
     */
    protected abstract void itemClick();

}
